
#if defined(WIN32) || defined(WIN64)
#pragma unmanaged
#endif

#include <Liberty3D/Engine/XML/Parser.h>

bool Liberty::Engine::Xml::containsWhitespaces(const std::string& data) {
    if (data.length() == 0) {
        return false;
    }

    std::string::const_iterator it, end(data.end());

    for (it = data.begin(); it != end; ++it) {
        char c = *it;

        if (c < 0) {
            continue;
        }

        if (c == ' ') {
            std::string::const_iterator next(it);

            ++next;

            if (next != end) {
                if (*next == ' ') {
                    return true;
                }
            }
        }
        else if (isspace(c)) {
            return true;
        }
    }

    return false;
}
